﻿@using System.Globalization
<Row>
    <Col Span="12">
        <Text>en-US</Text>
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Date" Locale="@EN" CultureInfo="CiEn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Week" Locale="@EN" CultureInfo="CiEn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Month" Locale="@EN" CultureInfo="CiEn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Quarter" Locale="@EN" CultureInfo="CiEn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Year" Locale="@EN" CultureInfo="CiEn" />
        <br />
    </Col>

    <Col Span="12">
        <Text>zh-CN</Text>
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Date" Locale="@CN" CultureInfo="CiCn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Week" Locale="@CN" CultureInfo="CiCn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Month" Locale="@CN" CultureInfo="CiCn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Quarter" Locale="@CN" CultureInfo="CiCn" />
        <br />
        <DatePicker TValue="DateTime?" Picker="@DatePickerType.Year" Locale="@CN" CultureInfo="CiCn" />
        <br />
    </Col>
</Row>

@code{
    CultureInfo CiEn = CultureInfo.GetCultureInfo("en-US");
    CultureInfo CiCn = CultureInfo.GetCultureInfo("zh-CN");


    DatePickerLocale EN = new DatePickerLocale
    {
        FirstDayOfWeek = DayOfWeek.Monday,
        Lang = new DateLocale
        {
            YearFormat = "yyyy",
            MonthFormat = "MMM",
            DateSelect = "Select date",
            WeekSelect = "Select week",
            MonthSelect = "Select month",
            YearSelect = "Select year",
            QuarterSelect = "Select quarter",
            Today = "Today"
        }
    };
    DatePickerLocale CN = new DatePickerLocale
    {
        FirstDayOfWeek = DayOfWeek.Sunday,
        Lang = new DateLocale
        {
            YearFormat = "yyyy年",
            MonthFormat = "M月",
            DateSelect = "选择日期",
            WeekSelect = "选择周",
            MonthSelect = "选择月份",
            YearSelect = "选择年份",
            QuarterSelect = "选择季度",
            Today = "今天"
        }
    };
}
